import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:material_collection_app/utils/utils.dart';

class CountText extends StatelessWidget {
  final int number;

  CountText({
    Key key,
    this.number
  })
  : super(key: key);

  @override
  Widget build(BuildContext context) {
    ScreenUtil.init(context, width: 750, height: 1334, allowFontScaling: false);

    return Container(
      padding: EdgeInsets.fromLTRB(25.w, 23.w, 25.w, 0),
      child: Align(
        alignment: Alignment.centerLeft,
        child: Row(
          children: <Widget>[
            Text('共有',
              style: TextStyle(
                color: Utils.hexToColor('#999999'),
                fontSize: 12
              ),
            ),
            Container(
              margin: EdgeInsets.only(top: 2),
              child: Text(number.toString(),
                style: TextStyle(
                  color: Utils.hexToColor('#297CFF'),
                  fontSize: 12
                ),
              ),
            ),
            Text('个物资',
              style: TextStyle(
                color: Utils.hexToColor('#999999'),
                fontSize: 12
              ),
            ),
          ],
        )
      ),
    );
  }
}